/**
 * @description 
 * @author cq
 * @Date 2021-04-07 18:35:13
 * @LastEditTime 2021-04-07 19:55:14
 * @LastEditors cq
 */
function thunk({ dispatch, getState }) {
  return next => action => {
    // action 数据类型是？对象 | 函数
    if (typeof action === "function") {
      return action(dispatch, getState);
    }
    return next(action);
  };
}

export default thunk